﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace A2DFramework.FileService.Configuration
{
    public static class FileServiceConfiguration
    {
        /// <summary>
        /// 默认的DFS前缀
        /// </summary>
        public static string NetworkShareRoot { get; set; }

        static FileServiceConfiguration()
        {
            XElement root = XElement.Load(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "A2D.config"));

            root = root.Element("ShareFileSetting");
            if (root == null)
                throw new Exception("ShareFileSetting node not exists");

            NetworkShareRoot = root.Element("NetworkShareRoot").Value;
        }
    }
}
